POV-Ray : Newsgroups : povray.unofficial.patches : complicated functions : Re: complicated functions Server Time
2 Sep 2024 02:12:11 EDT (-0400)
  Re: complicated functions  
From: Warp
Date: 10 Nov 2000 07:52:46
Message: <3a0bef9d@news.povray.org>
Mark Wagner <mar### [at] gtenet> wrote:
: Guess what?  This works just fine in MegaPOV 0.5a!

: #declare Fact = function{ 1 }
: #declare Fact = function { x<1 ? 1 : x*Fact(x-1) }

  Looks like a kludge (I suppose that the first line is to fool the parser
to not to issue an error for the 'Fact()' call in the second line) :)

  I suppose that this kind of recursion is not speed-optimized in the current
code.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.